package com.xlh.openai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xlh.openai.entity.ProductEntity;
import com.xlh.openai.vo.MallOrderCreateVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * @author 1280251739@qq.com
 * @email sunlightcs@gmail.com
 * @date 2023-03-31 21:29:05
 */
public interface ProductService extends IService<ProductEntity> {

    /**
     * 支付接口
     * @param mallId
     * @param request
     * @param session
     * @return
     */
    MallOrderCreateVO pay(Integer mallId, HttpServletRequest request, HttpSession session);

    /**
     * 商品递减
     * @param id
     */
    void decrease(Integer id, Integer stock);

    /**
     * 商品递增
     * @param id
     * @param stock
     */
    void increase(Integer id, Integer stock);


    /**
     * 获取福利产品
     * @return
     */
    ProductEntity getExchangeProduct();

}

